package com.hangzhou.xyj.model;

import java.io.Serializable;

/**
 * Created by yaohuix on 2016/4/27  16:06
 * <p/>
 * 说明：分享model
 */
public class ShareModel implements Serializable {
    //AppKey、AppSecret和RedirectUrl是您在新浪微博上注册开发者信息和应用后得到的信息
    private int id;//Id是一个保留的识别符，整型，ShareSDK不使用此字段，供您在自己的项目中当作平台的识别符。
    private int sortId;//此平台在分享列表中的位置，由开发者自行定义，可以是任何整型数字，数值越大越靠后
    private String appKey;
    private String appId;
    private String appSecret;
    private boolean enable;//是否可用
    private boolean isShareByAppClient;//是否使用客户端分享，默认是false
    /*BypassApproval是绕过审核的标记，设置为true后AppId将被忽略，故不经过
    审核的应用也可以执行分享，但是仅限于分享文字和图片，不能分享其他类型，
    默认值为false。此外，微信收藏不支持此字段。*/
    private boolean isBypassApproval;
    //您在新浪微博上注册开发者信息和应用后得到的信息
    private String redirectUrl;

    public ShareModel() {
    }

    /**
     * QQ分享的构造方法
     *
     * @param
     * @return
     * @author yaohuix
     * @date 2016/4/27 16:38
     */
    public ShareModel(String appId, String appKey, int sortId,  boolean isShareByAppClient, int id,boolean enable) {
        this.appId = appId;
        this.appKey = appKey;
        this.sortId = sortId;
        this.id = id;
        this.enable = enable;
        this.isShareByAppClient = isShareByAppClient;
    }

    /**
     * 微信分享，微信-朋友圈分享的构造方法
     *
     * @param
     * @return
     * @author yaohuix
     * @date 2016/4/27 16:43
     */
    public ShareModel(String appId, String appSecret, boolean isBypassApproval,  int id,int sortId, boolean enable) {
        this.appId = appId;
        this.appSecret = appSecret;
        this.isBypassApproval = isBypassApproval;
        this.sortId = sortId;
        this.id = id;
        this.enable = enable;
    }

    /**
     * 微博分享的构造方法
     *
     * @param appKey
     * @param appSecret
     * @param id
     * @param enable
     * @param redirectUrl
     * @param isShareByAppClient
     * @param sortId
     */
    public ShareModel(String appKey, String appSecret,  String redirectUrl, boolean isShareByAppClient, int id,int sortId, boolean enable) {
        this.appKey = appKey;
        this.appSecret = appSecret;
        this.id = id;
        this.enable = enable;
        this.redirectUrl = redirectUrl;
        this.isShareByAppClient = isShareByAppClient;
        this.sortId = sortId;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public boolean isEnable() {
        return enable;
    }

    public void setEnable(boolean enable) {
        this.enable = enable;
    }


    public boolean isBypassApproval() {
        return isBypassApproval;
    }

    public void setIsBypassApproval(boolean isBypassApproval) {
        this.isBypassApproval = isBypassApproval;
    }

    public boolean isShareByAppClient() {
        return isShareByAppClient;
    }

    public void setIsShareByAppClient(boolean isShareByAppClient) {
        this.isShareByAppClient = isShareByAppClient;
    }

    public String getRedirectUrl() {
        return redirectUrl;
    }

    public void setRedirectUrl(String redirectUrl) {
        this.redirectUrl = redirectUrl;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getSortId() {
        return sortId;
    }

    public void setSortId(int sortId) {
        this.sortId = sortId;
    }
}
